<template>
	<view class="all-list">
		<view v-for="(item,index) in pagedata" class="data-class" :key = "index"  :data-itemId ="item.iid" @click="gopage(item.item_id)">
				<image :src="item.image"></image>
				<view class="listfont">{{item.title}}</view>
				<view class="list-view">
					<view class="newp">{{item.discountPrice}}</view>
					<image src=""></image>
					<view>{{item.price}}</view>
				</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"inpageData",
		props:{
			pagedata:{
				type:Array,
				default:''
			}
		},
		data() {
			return {
				
			};
		},
		onLoad(){
			console.log(this.pagedata)
		},
		methods:{
			gopage(item){
				console.log(item)
				uni.navigateTo({
					url:"./indexpage?shopId="+item
				})
			},
		}
	}
</script>

<style scoped>
.data-class{
	width: 49%;
}
.data-class image{
	width: 100%;
}
.all-list{
	width: 96%;
	display: flex;
	justify-content: space-between;
	flex-wrap:wrap;
	margin: 10px auto;
	padding-bottom: 40px;
}
.listfont{
	font-size: 30upx;
	color: #666;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 30px;
}
.list-view{
	display: flex;
	height: 30px;
	line-height: 30px;
	justify-content: space-around;
	font-size: 24upx;
	overflow: hidden;
}
.newp{
	color:#DD4A68 ;
}
</style>
